package kaizone.haining.chaobohui.json;

import org.json.JSONObject;

public class UserFollowItem extends Item{

    public static final String ACT_CHK = "ACT_CHK";
    public static final String FOL_ACT = "FOL_ACT";
    public static final String FOL_SUBJ = "FOL_SUBJ";
    
    public static final String ACTIVITYID = "activityId";
    public static final String LOCATIONCODE = "locationCode";
    public static final String TARGETNAME = "targetName";
    public static final String TENANTID = "tenantId";
    public static final String TYPE = "type";
    public static final String USERNAME = "userName";
    
    private int activityId;
    private String locationCode;
    private String targetName;
    private int tenantId;
    private String type;
    private String userName;
    
    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }
    public String getLocationCode() {
        return locationCode;
    }
    public void setLocationCode(String locationCode) {
        this.locationCode = locationCode;
    }
    public String getTargetName() {
        return targetName;
    }
    public void setTargetName(String targetName) {
        this.targetName = targetName;
    }
    public int getTenantId() {
        return tenantId;
    }
    public void setTenantId(int tenantId) {
        this.tenantId = tenantId;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    
    public static UserFollowItem parse(JSONObject jsonObject){
        UserFollowItem userfollowitem = new UserFollowItem();
        
        Item item = Item.parse(jsonObject);
        userfollowitem.setItem(item);
        
        userfollowitem.setActivityId(jsonObject.optInt(ACTIVITYID));
        userfollowitem.setLocationCode(jsonObject.optString(LOCATIONCODE));
        userfollowitem.setTargetName(jsonObject.optString(TARGETNAME));
        userfollowitem.setTenantId(jsonObject.optInt(TENANTID));
        userfollowitem.setType(jsonObject.optString(TYPE));
        userfollowitem.setUserName(jsonObject.optString(USERNAME));
        
        return userfollowitem;
    }

}
